$(function () {
                $("#BrowseImageIcon").click(function () {
                    var ckfider = new CKFinder();
                    ckfider.selectActionFunction = function (fileUrl) {
                        $("#Image").val(fileUrl);
                    };
                    ckfider.popup();
                });
                $("#browseImageIcon1").click(function () {
                    var ckfider = new CKFinder();
                    ckfider.selectActionFunction = function (fileUrl) {
                        $("#image1").val(fileUrl);
                    };
                    ckfider.popup();
                })
                $("#browseImageIcon2").click(function () {
                    var ckfider = new CKFinder();
                    ckfider.selectActionFunction = function (fileUrl) {
                        $("#image2").val(fileUrl);
                    };
                    ckfider.popup();
                })
                $("#browseImageIcon3").click(function () {
                    var ckfider = new CKFinder();
                    ckfider.selectActionFunction = function (fileUrl) {
                        $("#image3").val(fileUrl);
                    };
                    ckfider.popup();
                })
                $("#browseImageIcon4").click(function () {
                    var ckfider = new CKFinder();
                    ckfider.selectActionFunction = function (fileUrl) {
                        $("#image4").val(fileUrl);
                    };
                    ckfider.popup();
                })
                $("#browseImageIcon5").click(function () {
                    var ckfider = new CKFinder();
                    ckfider.selectActionFunction = function (fileUrl) {
                        $("#image5").val(fileUrl);
                    };
                    ckfider.popup();
                })
            });
function ConfirmChoiceDelete(url)
{
	answer = confirm("Bạn có chắc muốn xóa?")
	if (answer !=0)
	{
		location = url
	}
}

// confirm when client delete multi item
function ConfirmChoiceDeleteMulti()
{
	answer = confirm("Do you really want to delete it?")
	if (answer !=0)
	{
		return true;
	}else{
		return false;
	}
}
function validation(){     
        var keyword = document.form_search_place.keyword.value.trim();

        if (keyword.length <= 0){
            return false;
        }
        var length = document.form_search_place.keyword.value.length;
        if (length >300)
        {        
            alert("Từ khóa tìm kiếm quá dài");
            document.form_search_place.keyword.value ='';                
            document.form_search_place.keyword.focus();    
            return false;                   
        }           
        return true;
                        
    }